<template>
  <div class="content">
    <el-form
      :model="baseInfo"
      ref="formRef"
      label-width="160px"
      class="form__content"
    >
      <!-- <div class="divider">基本信息:</div> -->
      <el-row>
        <el-col :span="8">
          <el-form-item label="单据编号">
            {{ baseInfo.billNum }}
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="创建时间">
            {{ baseInfo.createTime }}
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="检查名称">
            <el-input disabled v-model="baseInfo.inspectName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="项目名称">
            <el-input disabled v-model="baseInfo.projectName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="合同名称">
            <el-input disabled v-model="baseInfo.contractName"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="单体(子项)工程名称">
            <el-input disabled v-model="baseInfo.subProjectCode"></el-input>
          </el-form-item>
        </el-col>
        <!-- <el-col :span="8">
          <el-form-item label="分部名称">
            <el-input disabled v-model="baseInfo.segmentCode"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="子分部名称">
            <el-input disabled v-model="baseInfo.subSegmentCode"></el-input>
          </el-form-item>
        </el-col> -->
      </el-row>
      <!-- <div class="divider">检查标准:</div> -->
      <el-row v-if="baseInfo.flowMinType != 15">
        <el-col :span="8">
          <el-form-item label="模块">
            <el-input disabled v-model="baseInfo.inspectClassName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="分部">
            <el-input
              disabled
              v-model="baseInfo.inspectSubClassName"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <!-- <div class="divider">检查项:</div> -->
      <el-row v-if="baseInfo.flowMinType != 15">
        <el-col :span="8">
          <el-form-item label="子分部">
            <el-input disabled v-model="baseInfo.inspectItemName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="分项">
            <el-input disabled v-model="baseInfo.inspectSubItemName"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <!-- <div class="divider">检查安排:</div> -->
      <el-row>
        <el-col :span="8">
          <el-form-item label="检查人">
            <el-input disabled v-model="baseInfo.inspectorName"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="检查类型">
            <el-input disabled v-model="baseInfo.inspectTypeName"></el-input>
          </el-form-item>
        </el-col>
        <!-- <el-col :span="8">
          <el-form-item label="检查截止时间">
            <el-date-picker
              disabled
              v-model="baseInfo.inspectionDeadline"
              type="datetime"
              value-format="YYYY-MM-DD HH:mm:ss"
              placeholder="选择日期"
            ></el-date-picker>
          </el-form-item>
        </el-col> -->
      </el-row>
    </el-form>
  </div>
</template>

<script lang="ts" setup>
import { defineProps, watch, ref } from "vue";

const props = defineProps({
  basicInfoData: {
    type: Object,
    default: () => {}
  }
});

let baseInfo = ref(null);

watch(
  () => props.basicInfoData,
  newVal => {
    if (newVal) {
      baseInfo.value = newVal;
    }
  },
  {
    deep: true,
    immediate: true
  }
);
</script>

<style lang="scss" scoped>
.divider {
  margin-bottom: 10px;
  // border-left: 3px solid #409eff;
  text-indent: 8px;
}
.content {
  width: 100%;
  margin-bottom: 20px;
}

:deep .el-select {
  width: 100%;
}
:deep .el-date-editor {
  width: 100%;
}
</style>
